package org.springframework.po;

import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyClassPathXmlApplicationContext extends ClassPathXmlApplicationContext {

	public MyClassPathXmlApplicationContext(String... configLocations){
		super(configLocations);
	}

	@Override
	protected void initPropertySources() {
		String requireProperties1 = "username";
		getEnvironment().setRequiredProperties(requireProperties1);
	}

	@Override
	protected void customizeBeanFactory(DefaultListableBeanFactory beanFactory) {
		this.setAllowBeanDefinitionOverriding(false);
//		this.setAllowCircularReferences(false);
		super.customizeBeanFactory(beanFactory);
	}
}
